# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$

PortSystem          1.0
PortGroup           github 1.0
PortGroup           active_variants 1.1
PortGroup           waf 1.0

github.setup        drahnr oregano 0.83.2.1 v
categories          gnome science
maintainers         ahoi.io:bernhard openmaintainer
license             GPL-2+

description         A graphical software application for schematic capture and simulation of electrical circuits.
long_description    ${description} It uses Gtk+ 3.x for the frontend and ngspice or gnucap as backend for crunching numbers. \
                    File bugs for this port at https://github.com/drahnr/oregano

platforms           darwin

checksums           rmd160  7a5c06c6d7f260143ea0bbd9f92759beacde920d \
                    sha256  d22ab0dc9f3717759983966ea3f7a8cd266e343fab47236ec4d841660bd72fa1

# be careful not to overwrite build dependencies
# declared by the waf port group
depends_build-append \
                    port:intltool \
                    port:libtool \
                    port:pkgconfig

depends_lib         port:desktop-file-utils \
                    port:rarian \
                    port:shared-mime-info \
                    port:gtk3 \
                    port:gtksourceview3 \
                    port:goocanvas2

depends_run         port:gnome-themes-standard \
                    port:ngspice

# shipped waf does not recognize --nocache
configure.args-delete \
                    --nocache

# shipped waf requires target debug or release not build
build.target        debug

# allow port to build with either gtk3 +x11 or +quartz backend
variant quartz {}

if {[variant_isset quartz]} {
    require_active_variants gtk3 quartz
} else {
    require_active_variants gtk3 x11
    depends_run-append      port:yelp \
                            port:docbook-xml
}

post-activate {
    system "${prefix}/bin/scrollkeeper-update"
    system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
    system "${prefix}/bin/update-mime-database ${prefix}/share/mime"
    system "${prefix}/bin/glib-compile-schemas ${prefix}/share/glib-2.0/schemas"
}
